package com.team5101;

import com.team5101.bootstrap.ServerProvoiderBootStrap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


@SpringBootApplication
public class NettyRpcProviderServerApplication implements CommandLineRunner {


    @Autowired
    private ServerProvoiderBootStrap serverProvoiderBootStrap;

    public static void main(String[] args) {
        SpringApplication.run(NettyRpcProviderServerApplication.class, args);
    }


    // 实现CommandLineRunner 完成服务启动后 调用run 方法里的方法
    @Override
    public void run(String... args) throws Exception {
        serverProvoiderBootStrap.startServer();
    }
}
